package com.example.dormitorysystem.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author chen huilong
 * @data 2022/11/1
 */
@Configuration
public class RabbitmqConfig {


    @Bean
    public Queue orderQueue() {
        // durable 默认是 true，即开启持久化
        return new Queue("orders", true);
    }
}